var path = require('path');  // node内置模块。
// path.join() 拼接路径
var fullPath = path.join(__dirname, 'myprofile');
console.log(fullPath); 
// path.extname() 获取文件的后缀名
var extname = path.extname(__filename);
console.log(extname);  // .js

var basename2 = path.basename(__filename, extname);
console.log(basename2);   // 05

// path.dirname() 截取路径名
var dirname = path.dirname('c:/aa/bb/dd.html');
console.log(dirname);   // c:/aa/bb